import execjs, requests


# prelogin所需参数
# exectime: 10
# nonce: "UPV1KG"
# pcid: "gz-776ff2ee347ee24a75073e2a06882e6d87ed"
# pubkey: "EB2A38568661887FA180BDDB5CABD5F21C7BFD59C090CB2D245A87AC253062882729293E5506350508E7F9AA3BB77F4333231490F915F6D63C55FE2F08A49B353F444AD3993CACC02DB784ABBB8E42A9B1BBFFFB38BE18D78E87A0E41B9B8F73A928EE0CCEE1F6739884B9777E4FE9E88A1BBE495927AC4A799B3181D6442443"
# retcode: 0
# rsakv: "1330428213"
# servertime: 1587894636
def makenonce():
    with open('./weibo_prelogin.js', 'r')as f:
        js = f.read()
    return execjs.compile(js)


print(makenonce().call('makenonce'))
# class Weibo():
#     def init(self):
